package com.xiaoxi.bms.common.constant.enumeration.statuscode.user;


import com.xiaoxi.bms.common.constant.enumeration.statuscode.ParentEnum;

import java.util.HashMap;
import java.util.Map;

/**
 * @author xiaoxi
 * @version 1.0
 * @date 2022/5/19 14:25
 */
public enum ValidateCodeUserEnums implements ParentEnum {

    THE_VERIFICATION_CODE_CANNOT_BE_EMPTY("A040", "验证码不能为空"),
    THE_VERIFICATION_CODE_IS_INVALID("A041", "验证码已失效，请重新获取"),
    THE_VERIFICATION_CODE_HAS_EXPIRED("A042", "验证码已过期"),
    VERIFICATION_CODES_DO_NOT_MATCH("A043","验证码不匹配");

    private final String code;
    private final String message;

    ValidateCodeUserEnums(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }


    @Override
    public Map<String, String> format() {
        Map<String, String> enumData = new HashMap<>();
        enumData.put("code", this.code);
        enumData.put("message", this.message);
        return enumData;
    }
}
